package com.study.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;

@Controller
public class EncodingController {


    //过滤器解决乱码
    @PostMapping("/e/t1")
    //@GetMapping("/e/t1")get可以解决乱码
    public String test(Model model,String name){

        model.addAttribute("msg",name);
        return "hello";
    }
}
